<!--
 * @Author: 李红赟 1367194005@qq.com
 * @Date: 2025-04-28 08:27:34
 * @LastEditors: 李红赟 1367194005@qq.com
 * @LastEditTime: 2025-04-28 10:23:37
 * @FilePath: \signinpod-front\src\views\departure\discipline\components\detail.vue
 * @Description: 
 * 
 * Copyright (c) 2025 by ${git_name_email}, All Rights Reserved. 
-->
<template>
  <el-dialog title="违纪记录详情" :visible.sync="open" @close="close" width="500px" append-to-body>
    <el-descriptions :column="1" border>
      <el-descriptions-item label="注册号">{{ form.registerCode }}</el-descriptions-item>
      <el-descriptions-item label="姓名">{{ form.studentName }}</el-descriptions-item>
      <el-descriptions-item label="宿舍号">{{ form.dormitoryNo }}</el-descriptions-item>
      <el-descriptions-item label="违纪类型">
        <dict-tag :options="dict.type.dorm_violate_type" :value="form.violateType"/>
      </el-descriptions-item>
      <el-descriptions-item label="违纪时间">{{ form.violateTime }}</el-descriptions-item>
      <el-descriptions-item label="处理状态">
        <!-- <dict-tag :options="dict.type.dormitory_handle_status" :value="form.status"/> -->
        {{ form.delFlag == '0' ? '未处理' : '已删除'}}
      </el-descriptions-item>
      <el-descriptions-item label="备注">{{ form.remark }}</el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer">
      <el-button @click="close">关 闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { getDiscipline } from "@/api/departure/discipline";

export default {
  name: "Detail",
  dicts: ['dorm_violate_type', 'dormitory_handle_status'],
  props: {
    open: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      form: {}
    };
  },
  methods: {
    init(id) {
      getDiscipline(id).then(response => {
        this.form = response.data;
      });
    },
    close() {
      this.$emit('close')
    }
  }
};
</script>